package cn.starrysky.hrm.enums;

public enum CourseGrade {
//    <el-radio  label="1">青铜</el-radio>
//						<el-radio  label="2">白银</el-radio>
//						<el-radio  label="3">黄金</el-radio>
//						<el-radio  label="4">铂金</el-radio>

    bronze(1L,"青铜"),silver(2L,"白银"),gold(3L,"黄金"),Platinu(4L,"铂金");
    
    private Long id;
    private String gradeName;

    //获取等级
    public static CourseGrade getGrade(Long id){
        CourseGrade[] values = CourseGrade.values();
        for (CourseGrade gradeName : values) {
            if(gradeName.getId()==id){  //有对应等级
                return gradeName;
            }    
        }
        return null; //没有对应等级
    }
    
    CourseGrade() {
    }

    CourseGrade(Long id, String gradeName) {
        this.id = id;
        this.gradeName = gradeName;
    }

    @Override
    public String toString() {
        return "CourseGrade{" +
                "id=" + id +
                ", gradeName='" + gradeName + '\'' +
                '}';
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getGradeName() {
        return gradeName;
    }

    public void setGradeName(String gradeName) {
        this.gradeName = gradeName;
    }
}
